package com.qiezi.bean;


public class ResponseBean<T> {
    private int status;
    private String msg;
    private T data;

    @Override
    public String toString() {
        StringBuilder str = new StringBuilder("\n{\n\tstatus:").append(getStatus())
                .append("\n\tmsg:").append(getMsg())
                .append("\n\tdata:").append(getData() != null?getData().toString():"null")
                .append("\n}");
        return str.toString();
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSuccess(){
        if (msg == null)
            return false;
        return msg.equals("成功");
    }
}
